package cn.wolfcode.wolf2w.service.impl;

import cn.wolfcode.wolf2w.domain.Banner;
import cn.wolfcode.wolf2w.domain.Userfavor;
import cn.wolfcode.wolf2w.query.BannerQuery;
import cn.wolfcode.wolf2w.repository.BannerRepository;
import cn.wolfcode.wolf2w.repository.TravelRepository;
import cn.wolfcode.wolf2w.repository.UserfavorRepository;
import cn.wolfcode.wolf2w.service.IBannerService;
import cn.wolfcode.wolf2w.service.IUserfavorService;
import cn.wolfcode.wolf2w.util.DBHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

import java.util.List;

/**
* 横幅服务接口实现
*/
@Service
//@Transactional  现在写不能事务, 需要讲完复制集才能使用事务
public class UserfavorServiceImpl implements IUserfavorService {

    @Autowired
    private UserfavorRepository userfavorRepository;

    @Override
    public void save(Userfavor userfavor) {

    }

    @Override
    public void update(Userfavor userfavor) {

    }

    @Override
    public Userfavor get(String id) {
        return userfavorRepository.findById(id).orElse(null);
    }

    @Override
    public List<Userfavor> list() {
        return userfavorRepository.findAll();
    }

    @Override
    public void saveOrUpdate(Userfavor userfavor) {

    }

    @Override
    public void delete(String id) {

    }
}
